package kr.pe.johnkim.chattingday.mobile.rest.service;

import kr.pe.johnkim.chattingday.mobile.domain.ChattingDayCensorshipWord;
import kr.pe.johnkim.chattingday.mobile.rest.dao.ChattingDayCensorshipWordDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * ChattingDay 검열 단어 관련 서비스 메소드들을 구현하는 클래스 이다.
 *
 * @author : johnkim <cale9797@gmail.com / Bettersoft Inc,.>
 * @Date : 12. 5. 31
 */
public class ChattingDayCensorshipWordServiceImpl implements ChattingDayCensorshipWordService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(ChattingDayCensorshipWordServiceImpl.class);

    @Autowired
    private ChattingDayCensorshipWordDao chattingDayCensorshipWordDao = null;

    /**
     * 등록된 모든 검열 단어 목록을 가져 온다.
     *
     * @return List<ChattingDayCensorshipWord>
     */
    @Override
    public List<ChattingDayCensorshipWord> selectAllCensorshipWordList() {
        logger.info("selectAllCensorshipWordList");

        return chattingDayCensorshipWordDao.selectAllCensorshipWordList();
    }

    /**
     * 매핑된 검열 단어 목록을 가져 온다.
     *
     * @param chattingDayCensorshipWord
     * @return List<ChattingDayCensorshipWord>
     */
    @Override
    public List<ChattingDayCensorshipWord> selectSearchCensorshipWordList(ChattingDayCensorshipWord chattingDayCensorshipWord) {
        logger.info("selectSearchCensorshipWordList");

        return chattingDayCensorshipWordDao.selectSearchCensorshipWordList(chattingDayCensorshipWord);
    }
}
